﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XMLSpreadGear.Core;

namespace XMLSpreadGear.Headers
{
    public class Borders:BaseElement
    {
        private Border bBorder;

        public Border Border
        {
            get { return bBorder; }
            set { bBorder = value; }
        }

        public Borders()
            : base(LocalNames.BORDERS)
        {
        }
        public Borders(Border bborder)
            : this()
        {
            this.bBorder = bborder;
        }

        internal protected override IDictionary<string, string> RegisterElements()
        {
            IDictionary<string, string> dic = new Dictionary<string, string>();

            if(this.Border != null)
                dic.Add(LocalNames.BORDER, this.Border.ToString());

            return dic;
        }

        internal protected override IDictionary<string, string> RegisterAttributes()
        {
            IDictionary<string, string> dic = new Dictionary<string, string>();
            return dic;
        }

        protected override void SetDefaults()
        {
            return;
        }

        internal override string GetAttributeNamespace()
        {
            return Contstants.SpredsheetAttributePrefix;
        }

        internal override string GetAttributeNamespaceURI()
        {
            return Contstants.SpredsheetAttributeNamespace;
        }
    }
}
